package com.spcloud.fegin.controller;

import com.spcloud.common.entity.Order;
import com.spcloud.fegin.fegin.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author GuoChunbo
 * @create 2020-03-11 8:55
 * @Description: 类的描述
 */
@RestController
public class UserController {

    @Autowired
    OrderService orderService;

    /**
     * info
     */
    @GetMapping("/info")
    public String info(){
        //像调用对象的方法一样完成服务的调用
        String orderRes = orderService.info();
        return orderRes;
    }

    @GetMapping("/list")
    public List<Order> orderList(){
        return  orderService.getOrderList();
    }

}
